from 接口自动化.电子商城实战.apis.base_api import BaseApi


class Cart(BaseApi):
    def add_cart(self, goods_id, product_id):
        url = "wx/cart/add"
        add_cart_data = {"goodsId": goods_id,
                         "number": 1,
                         "productId": product_id
                         }

        r = self.send_req("POST", url, json=add_cart_data)
        return r
